package com.xiongda.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * 照片
 * @author 缪琼
 */
public class Photo {
    private Long id;// id

    private Long userId;// 用户id

    private Long categoryId;// 分类id

    private String path;// 图片路径

    private Date createTime;// 创建时间

    private Date updateTime;// 更新时间

    private Integer delFlag;// 逻辑删除标识

    private Integer praise;// 点赞

    private Integer isComment;// 是否可评论

    private String commentIds;// 评论ids

    public Photo(Long id, Long userId, Long categoryId, String path, Date createTime, Date updateTime, Integer delFlag, Integer praise, Integer isComment, String commentIds) {
        this.id = id;
        this.userId = userId;
        this.categoryId = categoryId;
        this.path = path;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.delFlag = delFlag;
        this.praise = praise;
        this.isComment = isComment;
        this.commentIds = commentIds;
    }

    public Photo() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path == null ? null : path.trim();
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public Integer getPraise() {
        return praise;
    }

    public void setPraise(Integer praise) {
        this.praise = praise;
    }

    public Integer getIsComment() {
        return isComment;
    }

    public void setIsComment(Integer isComment) {
        this.isComment = isComment;
    }

    public String getCommentIds() {
        return commentIds;
    }

    public void setCommentIds(String commentIds) {
        this.commentIds = commentIds == null ? null : commentIds.trim();
    }
}